package exception

import "fmt"

type ExpectError struct {
	Message string
}

func (e *ExpectError) Error() string {
	return e.Message
}

func NewExpectError(msg string, args ...interface{}) error {
	if args == nil || len(args) == 0 {
		return &ExpectError{Message: msg}
	}
	return &ExpectError{Message: fmt.Sprintf(msg, args...)}
}
